<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>输入新号码</title>
<link type="text/css" href="../css/reset.css" rel="stylesheet" />
<link type="text/css" href="../css/public.css" rel="stylesheet" />
<link type="text/css" href="../css/wode.css" rel="stylesheet" />
<script>
    var deviceWidth = Math.min(640, window.innerWidth)
    document.documentElement.style.fontSize = deviceWidth / 7.5 + "px"
</script>
 <script src="../js/jquery.min.js?v=2.1.4"></script>
 <script src="../js/core.js"></script>
<script src="../js/shezhixiugaixinshoujihaoma.js"></script>
</head>
<body>
<!-- top -->
<div class="header">
    <header class="p_header public-red">
        <a href="javascript:history.go(-1);" class="p_header_left">
            <i class="p_left" title="返回"></i>
        </a>
        <h1 class="p_dizhi">输入新号码</h1>
    </header>
</div>
<!--手机号码修改-->
<ul class="db_wangjimima">
    <li class="clearfix">
        <input type="text" class="zd-input05" id="phone" placeholder="请输入新手机号码" >
        <span class="msgs">获取验证码</span>
    </li>
    <li class="clearfix">
        <input type="text" id="code" placeholder="输入短信验证码" >   
    </li>
</ul>
<div class="mid-width" onclick="quedinganniu()">
    <input type="button" class="p_button" value="确认修改">
</div>

<script type="text/javascript" src="../js/jquery-1.10.1.min.js" ></script>
<script type="text/javascript">
$(function  () {
	
	
	 
	//获取短信验证码
	var validCode=true;
	$(".msgs").click (function  () {
		
		var phone=$("#phone").val();
	 if (!(/^1(3|4|5|7|8)\d{9}$/.test(phone))){ 
	            	alert("手机号码有误");
	            	return;
	  }else if(phone==sessionStorage.getItem("checkOldPhone2")){
	  	   alert("两次号码 一致不须修改");
	  	   return;
	  }else{
	  	var time=60;
		var code=$(this);
		if (validCode) {
			validCode=false;
			code.addClass("msgs1");
			yanzhengma();
		var t=setInterval(function  () {
			time--;
			code.html(time+"秒");
			if (time==0) {
				clearInterval(t);
			code.html("重新获取");
				validCode=true;
			code.removeClass("msgs1");
			}
		},1000)
		}
	  }
		
		
		
	})
	
	
})
</script>


</body>
</html>